package community.peers.hundreds;

import android.content.Context;
import android.webkit.JavascriptInterface;
import android.widget.Toast;

/**
* Created by asap on 7/14/15.
*/

public class HundredsServer {
    Context mContext;

    HundredsServer(Context c) {
        mContext = c;
    }

    @JavascriptInterface
    public void printToToast(String webMessage)
    {
        final String theAnswer = "Toast hears " + webMessage + "!";
        Toast.makeText(mContext, theAnswer, Toast.LENGTH_SHORT).show();
    }

    @JavascriptInterface
    public String printToHtml(String webMessage)
    {
        final String theAnswer = "Html hears " + webMessage + "!";
        return theAnswer;
    }

    //Put your own API here.
    //Make sure to annotate each one with @JavascriptInterface

}
